home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
04
/
4
/
DISK0440.ZIP
/
FILEFIX.ASC
< prev
next >
Wrap
Text File
|
1985-05-27
|
2KB
|
46 lines
100 'fixfile version 1.0 2-17-1985
110 'by Bill Buoy for CE Vetco Services
120 'modifies a communications data file to be a source file for
130 'Wordplus PCjr. It keys on C/R characters and pads the remainder
140 'of the line with nulls.
150 'Wordplus .TXT files have the form :
160 'lines of text CHR$(17)(null bytes to pad remainder of 80 columns.
170 'open format line markers are CHR$(16)
180 'Release to copy and use are hereby granted provided the credits are
190 'retained and the program is not sold, either by itself or as part
200 'of a package. All commercial rights are retained by the author.
210 WIDTH 80:CLEAR:PAD$=STRING$(80,0):COLOR 14
220 CLS:FILES:KEY OFF
230 INPUT "Enter input filename.ext"; IFILE$
240 INPUT "Enter output filename.ext"; OFILE$
250 IF IFILE$<>OFILE$ THEN 290
260 COLOR 4:BEEP:PRINT"Request denied. You will destroy the original."
270 COLOR 12:PRINT"Input and output filenames must be different."
280 COLOR 14:PRINT" Please reselect.":GOTO 230
290 IF LEN (OFILE$)<12.1 THEN 350
300 BEEP:PRINT"filename too long ... suggest ";:A=LEN(OFILE$)
310 A$=LEFT$(OFILE$,A-4)
320 OFILE$=RIGHT$(A$,8)+".TXT":COLOR 15:PRINT OFILE$:COLOR 14
330 INPUT "is this ok (y/n) ";A$: IF A$="Y" OR A$="y" THEN 350
340 GOTO 240
350 COLOR 2:PRINT "opening disc files ... please stand by."
360 OPEN IFILE$ FOR INPUT AS 1
370 OPEN OFILE$ FOR OUTPUT AS 2
380 CC%=0:O$=""
390 WHILE NOT EOF(1)
400 V=ASC(INPUT$(1,#1)):CC%=CC%+1
410 V=V AND 127
420 IF V=64 THEN V=16
430 IF V<>13 THEN 460
440 O$=CHR$(17)+LEFT$(PAD$,(80-CC%))
450 CC%=81:GOTO 470
460 O$=CHR$(V)
470 PRINT# 2,O$;:O$=""
480 IF CC%>79 THEN CC%=0
490 WEND
500 PRINT# 2,"raw copy - not edited"+CHR$(17)+LEFT$(PAD$,59);
510 PRINT# 2,DATE$+CHR$(17)+LEFT$(PAD$,69);
520 PRINT# 2,TIME$+CHR$(17)
530 PRINT" Job Complete - press fn 2 to run another.":KEY ON
540 COLOR 14:CLOSE:BEEP:END